.class public abstract Lcom/kwad/sdk/core/g/o;
.super Lcom/kwad/sdk/core/network/a;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/kwad/sdk/core/network/a<",
        "Lcom/kwad/sdk/core/g/p;",
        ">;"
    }
.end annotation


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/kwad/sdk/core/network/a;-><init>()V

    return-void
.end method

.method private a(Lcom/kwad/sdk/core/g/p;)V
    .locals 3

    :try_start_0
    invoke-virtual {p1}, Lcom/kwad/sdk/core/g/p;->f()Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-static {}, Lcom/kwad/sdk/KsAdSDKImpl;->get()Lcom/kwad/sdk/KsAdSDKImpl;

    move-result-object v1

    invoke-virtual {v1}, Lcom/kwad/sdk/KsAdSDKImpl;->getProxyForHttp()Lcom/kwad/sdk/export/proxy/AdHttpProxy;

    move-result-object v1

    const/4 v2, 0x0

    invoke-interface {v1, v0, v2}, Lcom/kwad/sdk/export/proxy/AdHttpProxy;->doGet(Ljava/lang/String;Ljava/util/Map;)Lcom/kwad/sdk/core/network/c;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    invoke-static {p1}, Lcom/kwad/sdk/core/d/b;->a(Ljava/lang/Throwable;)V

    :cond_0
    return-void
.end method


# virtual methods
.method protected a(Lcom/kwad/sdk/core/g/p;Lcom/kwad/sdk/core/network/c;)V
    .locals 0

    return-void
.end method

.method protected bridge synthetic a(Lcom/kwad/sdk/core/network/f;Lcom/kwad/sdk/core/network/c;)V
    .locals 0

    check-cast p1, Lcom/kwad/sdk/core/g/p;

    invoke-virtual {p0, p1, p2}, Lcom/kwad/sdk/core/g/o;->a(Lcom/kwad/sdk/core/g/p;Lcom/kwad/sdk/core/network/c;)V

    return-void
.end method

.method public b()V
    .locals 2

    invoke-static {}, Lcom/kwad/sdk/KsAdSDKImpl;->get()Lcom/kwad/sdk/KsAdSDKImpl;

    move-result-object v0

    invoke-virtual {v0}, Lcom/kwad/sdk/KsAdSDKImpl;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/ksad/download/d/b;->a(Landroid/content/Context;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "ReportNetwork"

    const-string v1, "no network while report log"

    invoke-static {v0, v1}, Lcom/kwad/sdk/core/d/b;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    :cond_0
    invoke-super {p0}, Lcom/kwad/sdk/core/network/a;->b()V

    return-void
.end method

.method protected c()V
    .locals 5

    invoke-virtual {p0}, Lcom/kwad/sdk/core/network/a;->a()Lcom/kwad/sdk/core/network/f;

    move-result-object v0

    check-cast v0, Lcom/kwad/sdk/core/g/p;

    :try_start_0
    invoke-virtual {v0}, Lcom/kwad/sdk/core/g/p;->e()Ljava/lang/String;

    move-result-object v1

    invoke-static {}, Lcom/kwad/sdk/KsAdSDKImpl;->get()Lcom/kwad/sdk/KsAdSDKImpl;

    move-result-object v2

    invoke-virtual {v2}, Lcom/kwad/sdk/KsAdSDKImpl;->getProxyForHttp()Lcom/kwad/sdk/export/proxy/AdHttpProxy;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v0}, Lcom/kwad/sdk/core/g/p;->b()Lorg/json/JSONObject;

    move-result-object v4

    invoke-interface {v2, v1, v3, v4}, Lcom/kwad/sdk/export/proxy/AdHttpProxy;->doPost(Ljava/lang/String;Ljava/util/Map;Lorg/json/JSONObject;)Lcom/kwad/sdk/core/network/c;

    move-result-object v1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    const-string v2, "ReportNetwork"

    if-eqz v1, :cond_0

    :try_start_1
    iget v1, v1, Lcom/kwad/sdk/core/network/c;->a:I

    const/16 v3, 0xc8

    if-ne v1, v3, :cond_0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "report success actionType:"

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, v0, Lcom/kwad/sdk/core/g/p;->b:I

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    :goto_0
    invoke-static {v2, v1}, Lcom/kwad/sdk/core/d/b;->a(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    :cond_0
    const-string v1, "report fail result is null"

    goto :goto_0

    :goto_1
    invoke-direct {p0, v0}, Lcom/kwad/sdk/core/g/o;->a(Lcom/kwad/sdk/core/g/p;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    :catch_0
    move-exception v0

    invoke-static {v0}, Lcom/kwad/sdk/core/d/b;->a(Ljava/lang/Throwable;)V

    :goto_2
    return-void
.end method
